package helper.scxml.scxml2.t0.case1_cycle.zone.s1.c1

import helper.base.debug.DebugHelper.DebuggerList
import helper.base.debug.DebugHelper.DebuggerList.Companion.makeDebuggerList
import helper.base.debug.DebugRes
import helper.base.debug.DebugRes.d_getCalString
import helper.base.debug.DebugRes.d_t_pT1Calculate_path
import helper.scxml.scxml2.t0.case1_cycle.zone.CycleEnvHelper.T1SNodeUnitObj.getT1T1SNodeUnit
import helper.scxml.scxml2.t0.case1_cycle.zone.CycleEnvHelper.T1SNodeUnitObj.getT2T1SNodeUnit
import helper.scxml.scxml2.t0.case1_cycle.zone.CycleEnvHelper.T1SNodeUnitObj.getT3T1SNodeUnit
import helper.scxml.scxml2.t0.case1_cycle.zone.CycleEnvHelper.T1SNodeUnitObj.getT4T1SNodeUnit
import helper.scxml.scxml2.t0.case1_cycle.zone.CycleEnvHelper.T1SNodeUnitObj.getT5T1SNodeUnit
import helper.scxml.scxml2.t0.case1_cycle.zone.CycleEnvHelper.CycleEnv.Companion.makeCycleEnv
import helper.scxml.strategy.sNodeUnit.SNodeUnitHelper.ISNodeUnit
import org.junit.Test

internal class CalTest {
    private fun test_type1Calculate(
        sNodeUnit: ISNodeUnit,
        debuggerList: DebuggerList = makeDebuggerList(),
    ) {
        debuggerList.add(d_t_pT1Calculate_path)
        val zoneEnv = makeCycleEnv()
        val result = zoneEnv.aT1Calculate(
            sNodeUnit,
            debuggerList,
        )
        println("result=${result}")
    }

    @Test
    fun c1t1() {
        test_type1Calculate(
            getT1T1SNodeUnit(),
        )
    }
    //result={t=180.0, c=450.0}

    @Test
    fun c1t2() {
        test_type1Calculate(
            getT2T1SNodeUnit(),
        )
    }
    //result={t=181.35313531342854, c=405.77557755765514}

    @Test
    fun c1t3() {
        test_type1Calculate(
            getT3T1SNodeUnit(),
        )
    }
    //result={t=174.61033232042433, c=375.8847171848096}

    @Test
    fun c1t4() {
        test_type1Calculate(
            getT4T1SNodeUnit(),
        )
    }
    //result={t=129.99999999999994, c=160.00000000000028}

    @Test
    fun c1t5() {
        test_type1Calculate(
            getT5T1SNodeUnit(),
        )
    }
    //result={t=229.99999999999747, c=630.0000000000022}
}